﻿<Window x:Class="Blackbird.Editors.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Width="400px" Height="300px"
        Name="MainWindowInst">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="20px" />
      <RowDefinition />
      <RowDefinition Height="20px" />
    </Grid.RowDefinitions>
    <Menu Name="FileName" Grid.Row="0" VerticalAlignment="Top" Height="25px">
      <MenuItem Name="FileMenuItem" Header="_File">
        <MenuItem Name="FileOpenMenuItem" Header="Open..." />
        <Separator />
        <MenuItem Name="FileNewMenuItem" Header="New...">
          <MenuItem Name="FileNewModuleMenuItem" Header="Module" Click="FileNewModuleMenuItemClick" />
          <Separator />
          <MenuItem Name="FileNewBackgroundMenuItem" Header="Background" />
          <MenuItem Name="FileNewMultispriteMenuItem" Header="Multisprite" Click="FileNewMultispriteMenuItemClick" />
        </MenuItem>
        <MenuItem Name="FileCloseMenuItem" Header="Close Module" Click="FileCloseMenuItemClick" />
        <Separator />
        <MenuItem Name="FileSaveModuleMenuItem" Header="Save Module" Click="FileSaveModuleMenuItemClick" />
        <MenuItem Name="FileSaveModuleAsMenuItem" Header="Save Module As..." Click="FileSaveModuleAsMenuItemClick" />
        <Separator />
        <MenuItem Name="FileExitMenutItem" Header="E_xit" Click="FileExitMenutItemClick" />
      </MenuItem>
    </Menu>

    <Grid Grid.Row="1" Name="ContentGrid">
      <Grid.RowDefinitions>
        <RowDefinition Height="50px" />
        <RowDefinition />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="50px" />
        <ColumnDefinition Width="50*" />
        <ColumnDefinition Width="50*" />
      </Grid.ColumnDefinitions>
      <StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
        <TextBlock Name="ModuleNameTextBlock"
                   Text="{Binding ElementName=MainWindowInst, Path=Module.Name, Mode=TwoWay}" VerticalAlignment="Center" />
      </StackPanel>
      <ToolBarTray Grid.Row="1" Orientation="Vertical">
        <ToolBar Band="1" BandIndex="1">
          <ToolBar.Items>
            <Button Click="FileNewMultispriteMenuItemClick">
              <Image Source="{StaticResource AddFolderImage}" Width="32px" />
            </Button>
            <Button>
              <Image Source="{StaticResource DeleteImage}" Width="32px" />
            </Button>
          </ToolBar.Items>
        </ToolBar>
      </ToolBarTray>
      <ListBox Name="SpriteListBox" Grid.Row="1" Grid.Column="1" Style="{StaticResource PaperListBoxStyle}"
               DataContext="{Binding ElementName=MainWindowInst, Path=Module.SpritePack}">
        <ListBox.ItemTemplate>
          <DataTemplate>
            <TextBlock Text="{Binding Path=Name}" />
          </DataTemplate>
        </ListBox.ItemTemplate>
      </ListBox>
      <ListBox Name="FramesetListBox" Grid.Row="1" Grid.Column="2" Style="{StaticResource PaperListBoxStyle}">
        <ListBox.ItemTemplate>
          <DataTemplate></DataTemplate>
        </ListBox.ItemTemplate>
      </ListBox>
    </Grid>

    <StatusBar Grid.Row="2" VerticalAlignment="Bottom" HorizontalContentAlignment="Left">
      <StatusBarItem>
        <TextBlock Name="ModuleNameStatusTextBlock"
                   Text="{Binding ElementName=MainWindowInst, Path=Module.Name, Mode=OneWay}" />
      </StatusBarItem>
      <StatusBarItem>
        <TextBlock Name="ModulePathTextBlock"
                   Text="{Binding ElementName=MainWindowInst, Path=ModuleFilename, Mode=OneWay}" />
      </StatusBarItem>
    </StatusBar>
  </Grid>
</Window>